package cn.kgc.entity;

import java.util.Date;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.*;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * (UmsMember)表实体类
 *
 * @author makejava
 * @since 2022-12-02 08:45:30
 */
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName(value = "ums_member")
@SuppressWarnings("serial")
@JsonInclude(value = JsonInclude.Include.NON_NULL)
public class UmsMember extends Model<UmsMember> implements Serializable {

    @TableId(type = IdType.AUTO)
    private Long id; //主键


    /**
     * 会员等级id
     **/
    @TableField(value = "level_id")
    private Long levelId;


    /**
     * 用户名
     **/
    @TableField(value = "username")
    private String username;


    /**
     * 密码
     **/
    @TableField(value = "password")
    private String password;


    /**
     * 昵称
     **/
    @TableField(value = "nickname")
    private String nickname;


    /**
     * 手机号码
     **/
    @TableField(value = "mobile")
    private String mobile;


    /**
     * 邮箱
     **/
    @TableField(value = "email")
    private String email;


    /**
     * 头像
     **/
    @TableField(value = "header")
    private String header;


    /**
     * 性别
     **/
    @TableField(value = "gender")
    private Short gender;


    /**
     * 生日
     **/
    @TableField(value = "birth")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date birth;


    /**
     * 所在城市
     **/
    @TableField(value = "city")
    private String city;


    /**
     * 职业
     **/
    @TableField(value = "job")
    private String job;


    /**
     * 个性签名
     **/
    @TableField(value = "sign")
    private String sign;


    /**
     * 用户来源
     **/
    @TableField(value = "source_type")
    private Short sourceType;


    /**
     * 积分
     **/
    @TableField(value = "integration")
    private Integer integration;


    /**
     * 成长值
     **/
    @TableField(value = "growth")
    private Integer growth;


    /**
     * 启用状态
     **/
    @TableField(value = "status")
    private Short status;


    @TableField(value = "creationdate", fill = FieldFill.INSERT)
    @JsonIgnore
    private Date creationdate; //创建时间


    @TableField(value = "modifydate", fill = FieldFill.UPDATE)
    @JsonIgnore
    private Date modifydate; //修改时间


    @TableLogic
    @JsonIgnore
    @TableField(fill = FieldFill.INSERT)
    private int deleted;  //逻辑删除标志


    @Version
    private int version;   //版本


}
